#ifndef __EditBox_H__
#define __EditBox_H__
#include "../GuiEvent.h"
#include "vmio.h"

#define COLOR_EDITBOX_HINT_TEXT	V_RGB(193,193,193)
#define COLOR_EDITBOX_TEXT		V_RGB(0,0,0)

enum
{
	EDITBOX_TYPE_TEXT = VM_INPUT_METHOD_TEXT,
	EDITBOX_TYPE_PASSWORD = VM_INPUT_METHOD_PASSWORD,
	EDITBOX_TYPE_NUMBER = VM_INPUT_METHOD_NUMERIC,
	EDITBOX_TYPE_ALPHABETIC = VM_INPUT_METHOD_ALPHABETIC
};

struct control_editbox
{
	struct common_control_property p;
	VMSTR hint_msg;
	VMUINT16 hint_color; 
	VMWSTR text;
	VMSTR default_text;
	VMUINT16 text_color;
	VMINT text_max_size;
	VMINT type;
};

extern VMINT CreateEditBox(VMSTR default_text, VMINT is_actived, VMINT x, VMINT y, VMINT width, VMINT height, VMSTR hint_msg, VMINT max_size, VMINT type);
extern void RegisterCurFocusedEditBox(VMINT hctrl);
extern void ShowEditBox(VMINT hctrl);
extern void RefreshEditBox(VMINT hctrl);
extern void FreeEditBox(VMINT hctrl);
extern void TouchEditBoxEventHandle(VMINT tevent, VMINT x, VMINT y);
extern void EditBoxInput(VMINT hctrl);

#endif
